<?php
namespace Game\Lib;
class RedisConst
{

    /*****************************
    参数
     *****************************/
    const SUCCESS                       = 0;        //操作成功
    const FAILED                        = -1;       //操作失败
    const Key_Nonexistent               = 0;
    const Key_Exists                    = true;
    const Member_Nonexistent            = false;
    const Member_Exists                 = true;
    const DATA_NONEXISTENT              = false;        //数据不存在


    /*
     Logs
    */
//    const GameResult_Key                = "GameResult:[dealernum]:[gametype]";
//    const GameScore_Key                 = "GameScore:[dealernum]:[gametype]";
    /**
     * Room_Game    hash
     */
    const Room_Key                  = "Room:[roomid]";  // 房间信息
    const Room_Field_Number         = "number";         // 房间号
    const Room_Field_CurrentGameSet = "currentgameset"; // 当前局数
    const Room_Field_TotalGameSet   = "totalgameset";   // 每轮总局数
    const Room_Field_Status         = "status";         // 房间状态，1等待、2进行中、3关闭
    const Room_Field_DefaultScore   = "defaultscore";   // 开局默认分数
    const Room_Field_Banker         = "banker";         // 庄家 account_id
    const Room_Field_Scoreboard     = "scoreboard";     // 每局积分榜
    const Room_Field_Creator        = "creator";        // 房间创建者 account_id
    const Room_Field_TicketCount    = "ticketcount";    // 每轮消耗房卡数量 1   2
    const Room_Field_ChipType       = "chiptype";       // 筹码组  1   2
    const Room_Field_DisablePkScore = "dispkscore";     // 不能比牌
    const Room_Field_DisablePkMen   = "dispkmen";       // 不能比牌
    const Room_Field_DisableLook    = "dislook";        // 首轮不能看牌
    const Room_Field_UpperLimit     = "upperlimit";     // 封顶上限
    const Room_Field_XiPaiScore     = "xipaiscore";     // 喜牌
    const Room_Field_StartTime      = "starttime";      // 开局时间
    const Room_Field_Onlybig        = "onlybig";        // 只发AKQJ10
    const Room_Field_Password       = "password";       // 房间密码.
    const Room_Field_PlayerCount    = "playercount";    // 玩家数量.
    const Room_Field_MaxPlayerCount = "maxplayercount"; // 最大玩家数量.

    const Room_Password_Key         = "RoomPassword";   // 房间密码表


    /**
     * 房间玩家--加入房间后 有序集合SortedSet
     *   score : seat_number 座号
     *   value : account_id  玩家ID
     */
    const RoomPlayerSequence_Key    = "RoomSequence:[roomid]";

    /**
     * 游戏当前局玩家--一局玩完就清空 列表List
     */
    const PlayerMember_Key                = "PlayerMember:[roomid]";

    /**
     * 用户状态 hash
     */
    const AccountStatus_Key             = "AccountStatus:[roomid]";
    const AccountStatus_Field_User      = "[accountid]";









    //房间观战者列表
    const RoomGuest_Key             = "RoomGuest:[roomid]";



    /*
    Room_Game User Score    总积分    hash
    */
    const RoomScore_Key                 = "RoomScore:[roomid]";
    const RoomScore_Field_User          = "[accountid]";


    /*
        已经下注的筹码
        hash
    */
    const Chip_Key                  = "Chip:[roomid]";
    const Chip_Field_User           = "[accountid]";

    /*
        是否已经看牌  0尚未看牌   1已经看牌
        hash
    */
    const SeenCard_Key              = "Seen:[roomid]";

    /*
        手牌
        hash
    */
    const Card_Key              = "Card:[roomid]";
    const Card_Field_User       = "[accountid]";

    /*
        当前游戏局参数
        hash
    */
    const Play_Key                  = "Play:[roomid]";
    const Play_Field_PoolScore      = "poolScr";        //分数池
    const Play_Field_Benchmark      = "mark";           //当前叫分基准
    const Play_Field_ActiveUser     = "actUser";            //当前操作用户，默认-1
    const Play_Field_TimerId        = "timerId";            //当前计时器ID，默认-1
    const Play_Field_TimerTime      = "timerTime";          //自动开局计时器设置时间，默认-1表示没有倒计时




}


/* End of file constants.php */
/* Location: ./application/config/constants.php */
